﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UC_Phong_CaiDatGia.ascx.cs" Inherits="QuanLyKhachSan.UC_Phong_CaiDatGia" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<style type="text/css">
    .comment-center-col
    {
        background: none repeat scroll 0 0 #FAFAFA;
        border: 1px solid #CFD6E0;
        border-radius: 5px 5px 5px 5px;
        color: #313C46;
        float: left;
        font-size: 1.083em;
        padding: 10px 20px;
        position: relative;
        width: 818px;
        }
     .comment-nav
     {
        background: none repeat scroll 0 0 #F3F5F9;
        border-bottom: 1px solid #CFD6E0;
        border-radius: 5px 5px 0 0;
        font-size: 0.923em;
        list-style: none outside none;
        margin: -10px -20px 10px;
        padding: 12px 20px 10px;
        width: 100%;
         }
    
</style>
<script type="text/javascript" language="javascript">
    function frmThemGiaTheoGio_Open() {
        try {
            var URL = '<%=ResolveUrl("~/Pages/PopUp.aspx")%>';
            URL = URL + "?UCName=UC_GiaPhong_TheoGio_Edit&UCPath=QuanLyPhong&PhongID=" + getParameterByName("PhongID");            
            var oRadWindowManager = $find("<%= RadWindowManager1.ClientID %>");
            var frmThemGiaTheoGio = oRadWindowManager.open(URL, "frmThemGiaTheoGio");
            frmThemGiaTheoGio.SetSize(500, 250);
        } catch (e) {
            alert(e);
        }
    }
    function cmdThemGiaTheoGio_OnClientClicking(sender, args) {
        try {
            args.set_cancel(true);
            frmThemGiaTheoGio_Open();
        } catch (e) {
        alert(e);
        }
    }
    function getParameterByName(name) {

        var match = RegExp('[?&]' + name + '=([^&]*)')
                    .exec(window.location.search);

        return match ?
        decodeURIComponent(match[1].replace(/\+/g, ' '))
        : null;

    }
 </script>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" 
            EnableShadow="true" Skin="Windows7" Modal="true" VisibleStatusbar="false" >
            <Windows>
                 <telerik:RadWindow  
                    id="frmThemGiaTheoGio" 
                    runat="server"
                    showcontentduringload="false"
                    width="530px"
                    height="400px"
                    title="Cập nhật giá theo giờ"
                    behaviors="Close,Move,Resize,Maximize"  Animation="Resize" ReloadOnShow="true">
                </telerik:RadWindow>
            </Windows>
 </telerik:RadWindowManager>
 <table width="100%">
    <tr>
        <td>
            <div class="comment-center-col">
        <span class="comment-tail"></span>
        <ul class="comment-nav">                               
               <li style=" font-weight:bold">Thông tin phòng</li>
        </ul>                  
        <telerik:RadGrid ID="lstPhong" runat="server" Skin="Windows7">
                <MasterTableView DataKeyNames="PhongID" AutoGenerateColumns="false" GridLines="None">
                    <CommandItemSettings ExportToPdfText="Export to Pdf" />   
                    <GroupByExpressions>                               
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="LoaiPhongName" HeaderText="Loại phòng" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="LoaiPhongID" />
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                    </GroupByExpressions>
                    <Columns>                   
                        <telerik:GridTemplateColumn HeaderText="Phòng">
                            <ItemTemplate>
                                <%#Eval("PhongName")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" Width="100" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Tiện nghi">
                            <ItemTemplate>
                                <%#Eval("TienNghiName")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Số giường">
                            <ItemTemplate>
                                <%#Eval("SoGiuong")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="80" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Số người">
                            <ItemTemplate>
                                <%#Eval("SoNguoi")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="80" />
                        </telerik:GridTemplateColumn>
                    </Columns>                    
                </MasterTableView>          
            </telerik:RadGrid>              
            </div>
        </td>
    </tr>
    <tr>
        <td>
             <div class="comment-center-col">
        <span class="comment-tail"></span>
        <ul class="comment-nav">                               
               <li style=" font-weight:bold">Cài đặt giá</li>
        </ul>                  
        <table width="100%">
            <tr>
                <td valign="top">
                     <asp:UpdatePanel ID="UpnlThepGio" runat="server">
                        <ContentTemplate>
                            <table width="250">                                
                                <tr>                                        
                                    <td>
                                        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Width="250" 
                                            Skin="Web20">
                                            <Tabs>
                                                <telerik:RadTab Text="Theo giờ" Width="250" Font-Bold="true">
                                                </telerik:RadTab>
                                            </Tabs>
                                        </telerik:RadTabStrip>        
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <telerik:RadGrid ID="lstGiaTheoGio" runat="server" Skin="Windows7">
                                            <MasterTableView DataKeyNames="" AutoGenerateColumns="false" GridLines="None" Width="250">
                                                <CommandItemSettings ExportToPdfText="Export to Pdf" />   
                                                <Columns>                   
                                                    <telerik:GridTemplateColumn HeaderText="Giờ">
                                                        <ItemTemplate>
                                                            <%#Eval("GioPhongName")%>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="Phần trăm">
                                                        <ItemTemplate>
                                                            <%#PhanTram(Eval("PhanTram").ToString())%>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" Width="100" />
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="Giá">
                                                        <ItemTemplate>
                                                            <%#String.Format("{0:C}",Eval("GiaTien")).ToString().Replace("$","")%>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" />
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="Chỉnh sửa">
                                                        <ItemTemplate>
                                                            
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" Width="70" />
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </telerik:GridTemplateColumn>
                                
                                                </Columns>                    
                                            </MasterTableView>          
                                        </telerik:RadGrid>                                                  
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <telerik:RadButton ID="cmdThemGia" runat="server" Text="Thêm giá" OnClientClicking="cmdThemGiaTheoGio_OnClientClicking">
                                        </telerik:RadButton>      
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel>                      
                </td>
                <td valign="top">
                    <asp:UpdatePanel ID="UpnlTheoNgay" runat="server">
                        <ContentTemplate>
                            <table width="250">                                
                                <tr>                                        
                                    <td>
                                        <telerik:RadTabStrip ID="RadTabStrip2" runat="server" Width="250" 
                                            Skin="Web20">
                                            <Tabs>
                                                <telerik:RadTab Text="Theo ngày" Width="250" Font-Bold="true">
                                                </telerik:RadTab>
                                            </Tabs>
                                        </telerik:RadTabStrip>        
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                       
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <telerik:RadButton ID="cmdTheoNgay" runat="server" Text="Cập nhật">
                                        </telerik:RadButton>      
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel> 
                </td>
                <td valign="top">
                    <asp:UpdatePanel ID="UpnlTheoSoNguoi" runat="server">
                        <ContentTemplate>
                            <table width="250">                                
                                <tr>                                        
                                    <td>
                                        <telerik:RadTabStrip ID="RadTabStrip3" runat="server" Width="250" 
                                            Skin="Web20">
                                            <Tabs>
                                                <telerik:RadTab Text="Theo số người" Width="250" Font-Bold="true">
                                                </telerik:RadTab>
                                            </Tabs>
                                        </telerik:RadTabStrip>        
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Windows7">
                                            <MasterTableView DataKeyNames="" AutoGenerateColumns="false" GridLines="None" Width="250">
                                                <CommandItemSettings ExportToPdfText="Export to Pdf" />   
                                                <Columns>                   
                                                    <telerik:GridTemplateColumn HeaderText="Danh Sách Loại Phòng">
                                                        <ItemTemplate>

                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Left" />
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="Chỉnh sửa">
                                                        <ItemTemplate>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" Width="70" />
                                                    </telerik:GridTemplateColumn>
                                
                                                </Columns>                    
                                            </MasterTableView>          
                                        </telerik:RadGrid>                                                  
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <telerik:RadButton ID="RadButton1" runat="server" Text="Thêm giá" OnClientClicking="cmdThemGiaTheoGio_OnClientClicking">
                                        </telerik:RadButton>      
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel> 
                </td>
            </tr>
        </table>                        
        </div>
        </td>
    </tr>
 </table>
 


